﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<CRM.Database.Model.TechnicRequestsExt>" %>
<%--<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<CRM.Models.TechnicRequestsExt>" %>--%>

<%
    var leCol = new CRM.Database.Model.LegalEntitiesCollection(); 
%>

<%
    Html.DevExpress().ComboBox(settings =>
        {
            settings.Name = "IdLegalEntity";
            settings.CallbackRouteValues = new { Controller = "TD", Action = "TechnicRequestLEPartial", key = Model.Key };
            settings.Properties.ValueType = typeof(int);
            settings.Properties.TextField = "Name";
            settings.Width = 496;
            settings.Properties.ValueField = "IdLegalEntity";
            settings.Properties.EnableCallbackMode = true;
            settings.Properties.ClientSideEvents.SelectedIndexChanged = "function(s, e) { IdContact.PerformCallback();  }";
        }).BindList(leCol.GetFullDefinedLegalEntitiesByCustomerId(Model.Request.IdCustomer)).Bind(Model.IdLegalEntity).GetHtml();
        //}).BindList(DB.GetFullDefinedLegalEntitiesByCustomerId(Model.Request.IdCustomer)).Bind(Model.IdLegalEntity).GetHtml();
%>
